package com.mew.slots.core.common.roller.ili.a;

import lombok.Data;
import lombok.ToString;

import java.util.ArrayList;
import java.util.HashMap;

@Data
@ToString
public class Ili {

    //标识
    public final int[] flag = {-2,-6};
    //版本
    public final int main = 1;
    public final int sub = 0;

    //图标数量
    public int ia_num;

    public HashMap<String,Iarray> iarrays = new HashMap<>();

    /**
     * name  16
     * 长度 4
     * 偏移 4
     * 一个组24
     */
    @Data
    @ToString
    public static class Iarray{
        //名字
        public String name;
        //图数量
        public int inum;
        //偏移
        public int offset;
        //图形
        ArrayList<ArrayList<Integer>> ic = new ArrayList<>();
    }

    public boolean notIli(ArrayList<Byte> bytes){
        for (int j = 0; j < flag.length; j++) {
            if (flag[j]!=bytes.get(j)){
                return true;
            }
        }
        return false;
    }


}
